<template>
  <div class="container">
    <CustomVisit v-for="(item, index) in customVisitList" :key="index" :compare="item.compare" :count="item.count" />
  </div>
</template>

<script lang='ts' setup>
import { onMounted, reactive } from "vue";
import DataScreenService from "@/service/dataScreenService";
import { ICustomVisit } from "@/type/DataScreen";
import CustomVisit from "@/components/CustomVisit/index.vue";

let customVisitList: ICustomVisit[] = reactive([]);

const getCustomVisit = () => {
  DataScreenService.getCustomVisit().then(res => {
    customVisitList.length = 0;
    customVisitList.push(...res);
  })
}
onMounted(() => {
  getCustomVisit();
})
</script>
<style lang='less' rel='stylesheet/less' scoped>
.container {
  width: 100%;
  display: flex;

  justify-content: space-around;
}
</style>